-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArC: detect incorrect usage of javax.inject.Singleton #37648
Conversation
mkouba
commented
Dec 11, 2023
- jakarta.inject.Singleton should be used instead
@@ -44,6 +44,7 @@ void detect(ArcConfig config, ApplicationIndexBuildItem applicationIndex, Custom | |||
unsupported.add(new UnsupportedAnnotation("com.google.inject.Singleton", correctSingleton)); | |||
unsupported.add(new UnsupportedAnnotation("jakarta.ejb.Singleton", correctSingleton)); | |||
unsupported.add(new UnsupportedAnnotation("groovy.lang.Singleton", correctSingleton)); | |||
unsupported.add(new UnsupportedAnnotation("javax.inject.Singleton", correctSingleton)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we handle @ApplicationScoped
and friends somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, but it's not very common that the javax.enterprise:cdi-api
is on the classpath, unlike javax.inject
...
import jakarta.enterprise.event.Observes; | ||
import jakarta.inject.Singleton; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cescoffier To be honest - I don't understand what is the MyObserver
used for?
This comment has been minimized.
This comment has been minimized.
- jakarta.inject.Singleton should be used instead
e27689a
to
d1b359d
Compare
Rebasing CI as the failures are not related. |
This comment has been minimized.
This comment has been minimized.
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. |